import { IsArray, IsNotEmpty, IsNumber, IsOptional, IsString } from 'class-validator';

import { ApiProperty } from '@nestjs/swagger';
import { PageOptionsDto } from 'src/common/dto/page.dto';

export class CreateFontDto {
  @ApiProperty({ description: '字体名称' })
  @IsString()
  name: string;

  @IsString()
  @ApiProperty({ description: '字体编码' })
  code: string;

  @IsString()
  @ApiProperty({ description: '字体预览图' })
  preview: string;

  @IsNotEmpty()
  @IsString()
  @ApiProperty({ description: '字体源码' })
  source: string;

  @IsNotEmpty()
  @IsString()
  @ApiProperty({ description: '字体下载链接' })
  download: string;

  @IsNotEmpty()
  @IsString()
  @ApiProperty({ description: '字体描述' })
  description: string;

  @IsNotEmpty()
  @IsString()
  @ApiProperty({ description: '版本' })
  version: string;

  @IsNotEmpty()
  @IsString()
  @ApiProperty({ description: '字体协议' })
  license: string;
}

export class FontlistDto extends PageOptionsDto {}
